package com.ruoyi.consulting.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consulting.mapper.XlkjConsultingMapper;
import com.ruoyi.consulting.domain.XlkjConsulting;
import com.ruoyi.consulting.service.IXlkjConsultingService;

/**
 * 问题咨询Service业务层处理
 * 
 * @author wang
 * @date 2022-01-15
 */
@Service
public class XlkjConsultingServiceImpl implements IXlkjConsultingService 
{
    @Autowired
    private XlkjConsultingMapper xlkjConsultingMapper;

    /**
     * 查询问题咨询
     * 
     * @param id 问题咨询主键
     * @return 问题咨询
     */
    @Override
    public XlkjConsulting selectXlkjConsultingById(Long id)
    {
        return xlkjConsultingMapper.selectXlkjConsultingById(id);
    }

    /**
     * 查询问题咨询列表
     * 
     * @param xlkjConsulting 问题咨询
     * @return 问题咨询
     */
    @Override
    public List<XlkjConsulting> selectXlkjConsultingList(XlkjConsulting xlkjConsulting)
    {
        return xlkjConsultingMapper.selectXlkjConsultingList(xlkjConsulting);
    }

    /**
     * 新增问题咨询
     * 
     * @param xlkjConsulting 问题咨询
     * @return 结果
     */
    @Override
    public int insertXlkjConsulting(XlkjConsulting xlkjConsulting)
    {
        xlkjConsulting.setCreateTime(DateUtils.getNowDate());
        return xlkjConsultingMapper.insertXlkjConsulting(xlkjConsulting);
    }

    /**
     * 修改问题咨询
     * 
     * @param xlkjConsulting 问题咨询
     * @return 结果
     */
    @Override
    public int updateXlkjConsulting(XlkjConsulting xlkjConsulting)
    {
        xlkjConsulting.setUpdateTime(DateUtils.getNowDate());
        return xlkjConsultingMapper.updateXlkjConsulting(xlkjConsulting);
    }

    /**
     * 批量删除问题咨询
     * 
     * @param ids 需要删除的问题咨询主键
     * @return 结果
     */
    @Override
    public int deleteXlkjConsultingByIds(Long[] ids)
    {
        return xlkjConsultingMapper.deleteXlkjConsultingByIds(ids);
    }

    /**
     * 删除问题咨询信息
     * 
     * @param id 问题咨询主键
     * @return 结果
     */
    @Override
    public int deleteXlkjConsultingById(Long id)
    {
        return xlkjConsultingMapper.deleteXlkjConsultingById(id);
    }
}
